/**
 * 
 */
package calculator;

import java.awt.Component;

import javax.swing.JOptionPane;

/**
 * @author davide
 *
 */
public class DialogBuilder
{
    public static int createConfirmDialog(Component parent, Object message, String title)
    {
	return JOptionPane.showConfirmDialog(parent, message, title,
		JOptionPane.YES_NO_OPTION,
		JOptionPane.QUESTION_MESSAGE,
		null);

    }
    
    public static void createErrorDialog(Component parent, Object message, String title)
    {
	JOptionPane.showMessageDialog(parent, message, title, JOptionPane.ERROR_MESSAGE);
    }
    
    public static void createMessageDialog(Component parent, Object message, String title)
    {
	JOptionPane.showMessageDialog(parent, message, title,
		JOptionPane.INFORMATION_MESSAGE,
		null);
    }
}
